In many places, there was an #ifdef/#else block that selected one of two implmentations of rebind_alloc based on whether or not we had template aliases. Create a helper struct to encapsulate that bit of logic, and replace all the ifdefs with uses of that struct. No functionality change intented. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@234296 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/memory b/include/memory index 43f8dba..93e8f67 100644 --- a/include/memory +++ b/include/memory
@@ -1635,6 +1635,16 @@ {return __a;} }; +template <class _Traits, class _Tp> +struct __rebind_alloc_helper +{ +#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES + typedef typename _Traits::template rebind_alloc<_Tp> type; +#else + typedef typename _Traits::template rebind_alloc<_Tp>::other type; +#endif +}; + // allocator template <class _Tp>